home *** CD-ROM | disk | FTP | other *** search
- Path: news.ov.com!news
- From: glenn@ov.com (Fletcher.Glenn@ov.com)
- Newsgroups: comp.lang.c
- Subject: Re: operator % - compiler error
- Date: 20 Mar 1996 00:07:44 GMT
- Organization: OpenVision
- Message-ID: <4ini8g$i1u@spanky.pls.ov.com>
- References: <4ihuuh$6ul@hatathli.csulb.edu>
- Reply-To: glenn@ov.com
- NNTP-Posting-Host: foghorn.pls.ov.com
-
- In article 6ul@hatathli.csulb.edu, davidcho@csulb.edu (David Cho) writes:
- >When I try to compile, I get an erro message for the following line:
- >
- >
- >x=663608941*y%pow(2,32) /*I want remainder*/
- >
- >But the error message says "illegal use of floating point". What does
- >that mean? Isn't % used a an operator to calcuate the remainder?
-
-
- You're missing the point. % needs an integer argument, and pow()
- returns a double.
-
- Fletcher.Glenn@ov.com
-
-
-
-